From 507d9ee9ae524edd4e39942b735d987aa5d48359 Mon Sep 17 00:00:00 2001 From: diogo464 Date: Tue, 12 Aug 2025 16:24:14 +0100 Subject: Convert V2 UI to server-side data loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Convert page components to async server components using Drive_ls() - Split V2DirectoryView into server component (data processing) and V2DirectoryClient (interactivity) - Remove client-side useEffect + fetch API calls for directory listing - Data now loaded server-side and passed as props for better static rendering - Mutations still use page refresh to show updated data 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- frontend/app/v2/[...path]/page.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'frontend/app/v2/[...path]') diff --git a/frontend/app/v2/[...path]/page.tsx b/frontend/app/v2/[...path]/page.tsx index 4af0167..3b4cbb8 100644 --- a/frontend/app/v2/[...path]/page.tsx +++ b/frontend/app/v2/[...path]/page.tsx @@ -1,4 +1,5 @@ import { V2DirectoryView } from "@/components/v2/V2DirectoryView" +import { Drive_ls } from "@/lib/drive_server" export default async function V2DirectoryPage({ params, @@ -7,6 +8,7 @@ export default async function V2DirectoryPage({ }) { const { path: pathSegments } = await params const currentPath = '/' + (pathSegments?.join('/') || '') - - return + + const files = await Drive_ls(currentPath, false) + return } \ No newline at end of file -- cgit